package com.centit.framework.ip.oa.po;

import java.util.Date;
import java.sql.Timestamp;
import javax.persistence.Column;


import javax.persistence.Id;

import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;


import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;


/**
 * create by scaffold 2018-10-09 
 * @author codefan@sina.com
 
  用户绑定表用户绑定表，用于与投管系统的用户绑定   
*/
@Entity
@Table(name = "F_USER_BIND")
public class UserBind implements java.io.Serializable {
	private static final long serialVersionUID =  1L;



	/**
	 * 用户绑定编号 主键 
	 */
	@Id
	@Column(name = "rec_id")
	
	private String recId;

	/**
	 * OA用户编码 OA系统的用户编码 
	 */
	@Column(name = "user_code")
	@Length(min = 0, max = 32, message = "字段长度不能小于{min}大于{max}")
	private String  userCode;
	/**
	 * 投管平台用户编码 投管平台用户编码 
	 */
	@Column(name = "tz_userid")
	@Length(min = 0, max = 100, message = "字段长度不能小于{min}大于{max}")
	private String  tzUserid;
	/**
	 * 是否有效 T：有效；F：无效；X:禁用 
	 */
	@Column(name = "isvalid")
	@Length(min = 0, max = 0, message = "字段长度不能小于{min}大于{max}")
	private String  isvalid;
	/**
	 * 创建时间 记录创建时间 
	 */
	@Column(name = "create_time")
	private Date  createTime;
	/**
	 * 最后更新时间 最后更新时间 
	 */
	@Column(name = "last_update_time")
	private Date  lastUpdateTime;
	/**
	 * 最后更新人员编码 最后更新人员编码 
	 */
	@Column(name = "last_update_user_code")
	@Length(min = 0, max = 32, message = "字段长度不能小于{min}大于{max}")
	private String  lastUpdateUserCode;

	// Constructors
	/** default constructor */
	public UserBind() {
	}
	/** minimal constructor */
	public UserBind(
		String recId		
		) {
	
	
		this.recId = recId;		
			
	}

/** full constructor */
	public UserBind(
	 String recId		
	,String  userCode,String  tzUserid,String  isvalid,Date  createTime,Date  lastUpdateTime,String  lastUpdateUserCode) {
	
	
		this.recId = recId;		
	
		this.userCode= userCode;
		this.tzUserid= tzUserid;
		this.isvalid= isvalid;
		this.createTime= createTime;
		this.lastUpdateTime= lastUpdateTime;
		this.lastUpdateUserCode= lastUpdateUserCode;		
	}
	

  
	public String getRecId() {
		return this.recId;
	}

	public void setRecId(String recId) {
		this.recId = recId;
	}
	// Property accessors
  
	public String getUserCode() {
		return this.userCode;
	}
	
	public void setUserCode(String userCode) {
		this.userCode = userCode;
	}
  
	public String getTzUserid() {
		return this.tzUserid;
	}
	
	public void setTzUserid(String tzUserid) {
		this.tzUserid = tzUserid;
	}
  
	public String getIsvalid() {
		return this.isvalid;
	}
	
	public void setIsvalid(String isvalid) {
		this.isvalid = isvalid;
	}
  
	public Date getCreateTime() {
		return this.createTime;
	}
	
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
  
	public Date getLastUpdateTime() {
		return this.lastUpdateTime;
	}
	
	public void setLastUpdateTime(Date lastUpdateTime) {
		this.lastUpdateTime = lastUpdateTime;
	}
  
	public String getLastUpdateUserCode() {
		return this.lastUpdateUserCode;
	}
	
	public void setLastUpdateUserCode(String lastUpdateUserCode) {
		this.lastUpdateUserCode = lastUpdateUserCode;
	}



	public UserBind copy(UserBind other){
  
		this.setRecId(other.getRecId());
  
		this.userCode= other.getUserCode();  
		this.tzUserid= other.getTzUserid();  
		this.isvalid= other.getIsvalid();  
		this.createTime= other.getCreateTime();  
		this.lastUpdateTime= other.getLastUpdateTime();  
		this.lastUpdateUserCode= other.getLastUpdateUserCode();

		return this;
	}
	
	public UserBind copyNotNullProperty(UserBind other){
  
	if( other.getRecId() != null){
	this.setRecId(other.getRecId());}
  
		if( other.getUserCode() != null){
		this.userCode= other.getUserCode();}  
		if( other.getTzUserid() != null){
		this.tzUserid= other.getTzUserid();}  
		if( other.getIsvalid() != null){
		this.isvalid= other.getIsvalid();}  
		if( other.getCreateTime() != null){
		this.createTime= other.getCreateTime();}  
		if( other.getLastUpdateTime() != null){
		this.lastUpdateTime= other.getLastUpdateTime();}  
		if( other.getLastUpdateUserCode() != null){
		this.lastUpdateUserCode= other.getLastUpdateUserCode();}		

		return this;
	}

	public UserBind clearProperties(){
  
		this.userCode= null;  
		this.tzUserid= null;  
		this.isvalid= null;  
		this.createTime= null;  
		this.lastUpdateTime= null;  
		this.lastUpdateUserCode= null;

		return this;
	}
}
